function [positions_new,velocities] = bounds(positions_new,velocities,sizepop,total_op_num)
for i=1:sizepop
    for j=1:total_op_num
        if(positions_new(i,j)<-1)  %反弹-1
            positions_new(i,j)=-2-positions_new(i,j);
        end
        if(positions_new(i,j)>1)   %反弹1
           positions_new(i,j)=2-positions_new(i,j);
        end
        if(velocities(i,j)<-1)  %反弹-1
            velocities(i,j)=-2-velocities(i,j);
        end
        if(velocities(i,j)>1)   %反弹1
           velocities(i,j)=2-velocities(i,j);
        end      
    end
end

